<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/** @var $model \common\models\c2\entity\WarehouseNote */
?>
<div class="warehouse-note-detail">

    <table class="table table-bordered mt10">

        <tr class="tc">
            <td>产品名称</td>
            <td>sku</td>
            <td>单位</td>
            <td>件</td>
            <td>数量</td>
            <td>备注</td>
        </tr>

        <?php
        $noteItems = $model->getWarehouseNoteItems()->with('product', 'productSku', 'measure')->all() ?>

        <?php foreach ($noteItems as $item): ?>
            <tr class="tc">
                <td><?= $item->product->name . '(' . $item->product->sku . ')' ?></td>
                <td><?= $item->productSku->name ?></td>
                <td><?= $item->measure->name ?></td>
                <td><?= $item->pieces ?></td>
                <td><?= $item->quantity ?></td>
                <td><?= $item->memo ?></td>
            </tr>

        <?php endforeach; ?>

    </table>

</div>

